package com.wsjzzcbq.qianyuan.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsjzzcbq.qianyuan.common.bean.PageBean;
import com.wsjzzcbq.qianyuan.common.bean.R;
import com.wsjzzcbq.qianyuan.sys.bean.QuartzJob;
import com.wsjzzcbq.qianyuan.sys.param.AddQuartzJobParam;
import com.wsjzzcbq.qianyuan.sys.param.FindQuartzJobParam;
import com.wsjzzcbq.qianyuan.sys.param.TriggerJobParam;
import com.wsjzzcbq.qianyuan.sys.vo.QuartzJobVo;
import org.quartz.SchedulerException;

/**
 * QuartzJobService
 *
 * @author wsjz
 * @date 2022/03/22
 */
public interface QuartzJobService extends IService<QuartzJob> {

    R<PageBean<QuartzJobVo>> findList(FindQuartzJobParam param);

    R<?> addOrUpdate(AddQuartzJobParam param);

    R<?> deleteJob(String id);

    R<?> triggerJob(TriggerJobParam param);

    R<?> resumeJob(TriggerJobParam param);

    R<?> pauseJob(TriggerJobParam param);

    void scheduleQuartzJob(QuartzJob job) throws ClassNotFoundException, SchedulerException, IllegalAccessException, InstantiationException;
}
